import request from '@/utils/request'

export function oauth2Authorize(params = {}) {
    return request.get('/oauth2/authorize', params);
}

export function getUserInfo(params = {}) {
    return request.get('/user/getUserInfo', params);
}

export function getProductList(params = {}) {
    console.log('params===',params)
    return request.get('/common/product/list', {params});
}

export function getProductDetail(id) {
    return request.get(`/common/product/${id}`);
}

export function addComplaint(params = {}) {
    return request.post('/complaint', params);
}

export function getComplaintList(params = {}) {
    return request.get('/complaint/list', params);
}

export function getBankCardList(params = {}) {
    return request.get('/common/bankCard/list', params);
}


export function addBank(params = {}) {
    return request.post('/bank',params);
}

export function getBankList(params = {}) {
    return request.get('/bank/list',params);
}

export function getBankDetail(id) {
    return request.get(`/bank/${id}`);
}


export function applyProduct(params = {}) {
    return request.post('/product/apply', params);
}


export function uploadFile(params = {}) {
    return request.post('/publish/upload/file', params,{
        headers: {
            "Content-Type": "multipart/form-data",
        },
    });
}

export function addUserKyc(params = {}) {
    return request.post('/user/kyc', params);
}


export function addUserContactBaseInfo(params = {}) {
    return request.post('/user/baseInfo', params);
}

export function addUserContactPerson(params = {}) {
    return request.post('/user/contactPerson', params);
}



